package com.ruoyi.supermarket.controller;

import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.supermarket.domain.Qk;
import com.ruoyi.supermarket.service.IQkService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

import static com.ruoyi.common.utils.PageUtils.startPage;

@RestController
@RequestMapping("/supermarket/qk")
public class QkController extends BaseController {
    @Autowired
    private IQkService qkService;

    /**
     * 查询供客欠款列表
     */
    @PreAuthorize("@ss.hasPermi('supermarket:qk:list')")
    @GetMapping("/list")
    public TableDataInfo list(Qk qk)
    {
        startPage();
        List<Qk> list = qkService.selectQkList(qk);
        return getDataTable(list);
    }

}
